package homeworks;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Testnum1 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("./jojo.jpg");
        FileOutputStream fos=new FileOutputStream("./jojo_cp.jpg");

        byte[] buf=new byte[1024];
        int len;
        long strat=System.currentTimeMillis();
        while ((len=fis.read(buf))!=-1){
            fos.write(buf,0,len);
        }
        long end=System.currentTimeMillis();
        System.out.println("ok");
        System.out.println("time is:"+(end-strat));
        fis.close();
        fos.close();
    }
}
